package apiday03home;

import java.util.ArrayList;
import java.util.Collection;

public class RetainHome {
    public static void main(String[] args) {
        Collection c = new ArrayList();
        c.add("love");
        c.add("me");
        Collection c1 = new ArrayList();
        c1.add("dada");
        c1.add("love");
        c.retainAll(c1);//取交集
        System.out.println(c);

    }
}
